using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using kxcxw.Data.Entities;
using kxcxw.Data.Mapping;

namespace kxcxw.Data
{
	public class KXCXWDBContext : DbContext
	{
		static KXCXWDBContext()
		{ 
			Database.SetInitializer<KXCXWDBContext>(null);
		}

		public DbSet<AnnouncementInfo> AnnouncementInfoes { get; set; }
		public DbSet<InformationReview> InformationReviews { get; set; }
		public DbSet<PublichInformation> PublichInformations { get; set; }
		public DbSet<sysdiagram> sysdiagrams { get; set; }
		public DbSet<SysItemDetial> SysItemDetials { get; set; }
		public DbSet<SysItemInfo> SysItemInfoes { get; set; }
		public DbSet<SysUserInfo> SysUserInfoes { get; set; }
		public DbSet<SysUserProfile> SysUserProfiles { get; set; }
        public DbSet<AdApply> AdApplys { get; set; }
        public DbSet<Activity> Activitys { get; set; }
        public DbSet<Feedback> Feedbacks { get; set; }


        protected override void OnModelCreating(DbModelBuilder modelBuilder)
		{
            modelBuilder.Conventions.Remove<IncludeMetadataConvention>();
			modelBuilder.Configurations.Add(new AnnouncementInfoMap());
			modelBuilder.Configurations.Add(new InformationReviewMap());
			modelBuilder.Configurations.Add(new PublichInformationMap());
			modelBuilder.Configurations.Add(new sysdiagramMap());
			modelBuilder.Configurations.Add(new SysItemDetialMap());
			modelBuilder.Configurations.Add(new SysItemInfoMap());
			modelBuilder.Configurations.Add(new SysUserInfoMap());
			modelBuilder.Configurations.Add(new SysUserProfileMap());
            modelBuilder.Configurations.Add(new AdApplyMap());
            modelBuilder.Configurations.Add(new ActivityMap());
            modelBuilder.Configurations.Add(new FeedbackMap());
		}
	}
}

